home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c,comp.lang.c++,comp.object,comp.software-eng
- Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
- Date: Tue, 26 Mar 96 12:27:13 GMT
- Organization: none
- Message-ID: <827843233snz@genesis.demon.co.uk>
- References: <1995Jul3.034108.4193@rcmcon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca> <3155786F.1262@iadfw.net> <4j4hc5INNct5@keats.ugrad.cs.ubc.ca> <3155D8B2.6879@iadfw.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <3155D8B2.6879@iadfw.net> lfw@iadfw.net "Larry Weiss" writes:
-
- >Kazimir Kylheku wrote:
- > >
- > > >Kazimir Kylheku wrote:
- > > > > this I think is a major flaw in the otherwise great book.
- > >
- > > The book is a classic work, so it might as well be left alone, with its few
- > > minor warts and all.
- >
- >So, which is it? "major" or "minor" ?
-
- IMHO minor because it is not leading you on to write poor or non-conforming
- C code. By comparison the bad description of scanf and invalid redefinition
- of standard library functions in examples are much more serious. I've
- criticised Schildt in the past for leading by bad example; where K&R do the
- same they deserve the same criticism.
-
- >I don't want to allow this to pass so casually. K&R are certainly selling
- >a bunch of books to people on the premise that they have expertise in the
- >subject.
-
- There is no doubt that they do. The problem is in assuming that they are
- perfect which, as far as standard C is concerned, they are clearly not.
- However they make few mistakes compared to most other authors.
-
- > If they make fundamental errors in their text (and I'm starting
- >to believe that they are, in fact, misrepresenting the language C with respect
- >to the standard library) then we should shed some light on these mistakes
- >and maybe influence the next revision.
-
- I suspect that the full ANSI version of K&R2 was rushed. I'm sure K&R like
- everybody else understand the implications of the ANSI standard much more
- now than they did then. There are certainly errors in K&R2 that warrant
- revision.
-
- >This is exactly why I started this discussion. I am now even more convinced
- >that most programmers do not even yet understand the implications of some of
- >the most important decisions of the C Standardization effort.
-
- There are 3 categories of function you can call:
-
- 1. Functions that are well defined by the C language because you have
- the source code
-
- 2. Functions that are defined by the language itself i.e. standard library
- functions.
-
- 3. 'Other library' functions. Calling these results in undefined behaviour
- as far as the C language is concerned (or you had already invoked
- undefined behaviour by including a non-standard header file).
-
- The only things special about standard library functions are that
- they are guaranteed to exist with well-defined semantics in any conforming
- hosted implementation, and that certain identifiers are reserved. So long
- as you understand the rules it doesn't make a practical difference whether
- you consider the standard library to be part of the language or not -
- indeed a (freestanding) C language implementation can exist without the
- standard library.
-
- However saying that the standard library is not a part of the language is
- certainly going against the grain and I don't think it is a helpful. And of
- course it is a simple position to take that anything defined in ISO/IEC
- 9899-1990 is part of the C language. It guess it boils down to what you
- mean by "the C language" (which is quite important to a newsgroup
- called comp.lang.c!)
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-